﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HashmapExample
{
    public class Person
    {
        public List<Person> Children
        {
            get 
            {
                return this.children;
            }
        }

        public string Surname
        {
            get
            {
                return this.surname;
            }
        }

        public string Pesel
        {
            get
            {
                return this.pesel;
            }
        }

        private string name;
        private string surname;
        private string pesel;

        private bool isMan;

        private List<Person> children;

        public Person(string name, string surname, string pesel,
            bool isMan)
            : this(name, surname, pesel, isMan, new List<Person>()) { }

        public Person(string name, string surname, string pesel,
            bool isMan,
            List<Person> children)
        {
            this.name = name;
            this.surname = surname;
            this.pesel = pesel;

            this.isMan = isMan;

            this.children = children;
        }

        public override string ToString()
        {
            return "I'm " + name + " " + surname + ". I'm a " + ((isMan) ? "man" : "woman") + ". I've got " + this.children.Count.ToString() + " kids.";
        }
    }
}
